<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>分销设置</title>
    {template 'stourtravel/public/public_js'}
    {php echo Common::getCss('style.css,base.css,base_new.css'); }
    {php echo Common::getScript('config.js,ajaxform.js');}
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
    <link type="text/css" rel="stylesheet" href="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/css/fxview.css" />
    <script src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/js/layer/layer.js"></script>
    {php Common::getEditor('jseditor','',430,150,'raider','','print',true);}
</head>
<body>
<table class="content-tab">
    <tr>
        <td width="119px" class="content-lt-td"  valign="top">
            {template 'stourtravel/public/leftnav'}
            <!--右侧内容区-->
        </td>
        <td valign="top" class="content-rt-td">
            <div class="container-page">
        <div class="cfg-header-bar">
            <div class="cfg-header-tab">
                <span class="item on" data-id="pic">海报分销{Common::get_help_icon('fenxiao_type_pic')}</span>
                <span class="item" data-id="weixin">微信分销{Common::get_help_icon('fenxiao_type_wx')}</span>
                <span class="item" data-id="weibo">微博分销{Common::get_help_icon('fenxiao_type_weibo')}</span>
                <span class="item" data-id="codescan">当面扫码{Common::get_help_icon('fenxiao_type_facetoface')}</span>
                <span class="item" data-id="link">复制链接{Common::get_help_icon('fenxiao_type_copy_url')}</span>
            </div>
            <a href="javascript:;" class="fr btn btn-primary radius mt-6 mr-10" onclick="window.location.reload()">刷新</a>
        </div>
                <form method="post" name="product_frm" id="product_frm">
        <div class="clearfix product-add-div" id="item_pic">
            <ul class="info-item-block">
                <li>
                    <span class="item-hd">开关：</span>
                    <div class="item-bd">
                        <label class="radio-label"><input type="radio" name="way_pic" {if in_array('pic',$ways_arr)}checked="checked"{/if} value="1">开启</label>
                        <label class="radio-label ml-20"><input type="radio" name="way_pic" {if !in_array('pic',$ways_arr)}checked="checked"{/if} value="0">关闭</label>
                        <span class="item-text c-999 ml-10 va-t">*开启后前台页面将启用海报分销展示！</span>
                    </div>
                </li>
                <li>
                    <span class="item-hd">海报模板{Common::get_help_icon('fenxiao_type_pic_template')}：</span>
                    <div class="item-bd">
                        <div class="select-box w200">
                            <select class="select" name="cfg_fenxiao_pic_templet" id="pic_templet_sel">
                                <option value="0" {if $info['cfg_fenxiao_pic_templet']==0}selected="selected"{/if} >标准海报</option>
                                <option value="1" {if $info['cfg_fenxiao_pic_templet']=='1'}selected="selected"{/if}>海报模板1</option>
                            </select>
                        </div>
                        <a href="javascript:;" class="c-blue ml-10" id="ad_btn">高级海报{Common::get_help_icon('fenxiao_type_super_pic')}</a>
                        <div class="clearfix mt-20">
                            <div id="templet_board_0">
                                <div class="edit-view-container">
                                <h3 class="view-tit-bar">编辑海报</h3>
                                <div class="edit-view-wrapper">
                                    <ul class="edit-view-list">
                                        <li class="item-bar">
                                            <span class="hd">商家logo</span>
                                            <div class="switch-control fr {if in_array('logo',$pic_parts_arr)}switch-active{/if}">
                                                <span class="switch-handle"></span>
                                            </div>
                                            <span id="shop_logo" class="btn-link fr mr-20">编辑</span>
                                            <input type="checkbox" style="display: none;" {if in_array('logo',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="logo"/>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">产品名称</span>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">产品卖点</span>
                                            <div class="switch-control {if in_array('sellpoint',$pic_parts_arr)}switch-active{/if} fr">
                                                <span class="switch-handle"></span>
                                            </div>
                                            <input type="checkbox" style="display: none;" {if in_array('sellpoint',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="sellpoint"/>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">使用时间{Common::get_help_icon('cfg_fenxiao_pic_parts_date')}</span>
                                            <div class="switch-control {if in_array('date',$pic_parts_arr)}switch-active{/if} fr">
                                                <span class="switch-handle"></span>
                                            </div>
                                            <input type="checkbox" style="display: none;" {if in_array('date',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="date"/>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">产品价格</span>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">产品封面图</span>
                                            <div class="switch-control {if in_array('litpic',$pic_parts_arr)}switch-active{/if} fr">
                                                <span class="switch-handle"></span>
                                            </div>
                                            <input type="checkbox" style="display: none;" {if in_array('litpic',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="litpic"/>
                                        </li>
<!--                                        <li class="item-bar">-->
<!--                                            <span class="hd">产品图</span>-->
<!--                                            <div class="switch-control {if in_array('piclist',$pic_parts_arr)}switch-active{/if} fr">-->
<!--                                                <span class="switch-handle"></span>-->
<!--                                            </div>-->
<!--                                            <input type="checkbox" style="display: none;" {if in_array('piclist',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="piclist"/>-->
<!--                                        </li>-->
                                        <li class="item-bar">
                                            <span class="hd">分销商信息</span>
                                            <div class="switch-control {if in_array('fx',$pic_parts_arr)}switch-active{/if} fr">
                                                <span class="switch-handle"></span>
                                            </div>
                                            <input type="checkbox" style="display: none;" {if in_array('fx',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="fx"/>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">说明信息</span>
                                            <div class="switch-control {if in_array('introduce',$pic_parts_arr)}switch-active{/if} fr">
                                                <span class="switch-handle"></span>
                                            </div>
                                            <span id="appEditInfo" class="btn-link fr mr-20">编辑</span>
                                            <input type="checkbox" style="display: none;" {if in_array('introduce',$pic_parts_arr)}checked="checked"{/if} name="cfg_fenxiao_pic_parts[]"  value="introduce"/>
                                        </li>
                                        <li class="item-bar">
                                            <span class="hd">二维码</span>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                                <div class="phone-view-container">
                                <h3 class="view-tit-bar">预览海报</h3>
                                <div class="phone-view-wrapper">
<!--                                    <img class="share-view-header" src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/view-header.jpg" />-->
                                    <ul class="share-img-list">
                                        <li class="item view_litpic"><img src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/view-img01.jpg" width="370" height="242" /></li>
<!--                                        <li class="item view_piclist"><img src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/view-img02.jpg" width="170" height="116" /></li>-->
<!--                                        <li class="item view_piclist"><img src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/view-img03.jpg" width="170" height="116" /></li>-->
                                    </ul>
                                    <div class="share-product-img">
<!--                                        <div class="share-logo view_logo"><img src="{$cfg_m_logo}" alt=""></div>-->
                                        <div class="share-product-tit " style="font-weight:900">印度尼西亚巴厘岛+蓝梦岛7日5晚半自助游(5钻)·直飞纯玩惠·蓝梦出海+激情漂流 Villa+5星</div>
                                        <div class="share-product-txt view_sellpoint">5月23日引爆周三、蓝梦岛出海（水上活动一价全含无隐形消费）网红大瀑布等热门景点</div>
                                        <div class="share-product-date view_date">使用时间：2018-5-21，2018-5-22，2018-5-23，2018-5...</div>
                                        <div class="share-product-price"><em class="num">&yen;368</em>起</div>

<!--                                        <div class="share-user-info view_fx">-->
<!--                                            <img class="img" src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/view-img04.jpg" />-->
<!--                                            <span class="name">冒名顶替一冒名顶替一</span>-->
<!--                                            <span class="num">13983784561</span>-->
<!--                                        </div>-->
                                        <div class="share-edit-area clearfix view_introduce">
                                            备注：本产品由北京途牛国际旅行社有限公司成都分公司及具有资质的合作旅行社提供相关服务
                                        </div>

                                        <img style="padding: 5px;margin-bottom: 10px;margin-top: 10px" class="img shop_logo view_logo" src="{$cfg_fenxiao_df_fx_shop_logo}" width="350" height="60"/>
                                        <input type="hidden" name="cfg_fenxiao_df_fx_shop_logo" id="field_cfg_fenxiao_df_fx_shop_logo" value="{$cfg_fenxiao_df_fx_shop_logo}">

                                        <div class="share-ewm-area" style="background-color: #4cc34f;margin-top: 10px">
                                            <div  style="float: left;color: white;margin-left: 37px;margin-top: 14px;font-size: 15px;">
                                                <div>
                                                    扫码了解更多产品
                                                </div>
                                                <div class="view_fx" style="margin-top: 30px;">
                                                    张三
                                                </div>
                                                <div class="view_fx" style="margin-top: 10px;">
                                                    18888888888
                                                </div>
                                            </div>

                                            <div class="ewm">
                                                <img class="img" src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/view-img05.jpg" />
                                            </div>
<!--                                            <div class="txt">扫码了解更多产品信息</div>-->
                                        </div>
                                    </div>
                                </div>
                            </div>
                            </div>
                            <div id="templet_board_1">

                                <div class="edit-view-container">
                                    <h3 class="view-tit-bar">底部说明</h3>
                                    <div class="edit-view-wrapper">
                                        <ul class="edit-view-list">
                                            <li class="item-bar">
                                                <span class="hd">产品名称</span>
                                            </li>
                                            <li class="item-bar">
                                                <span class="hd">产品卖点</span>
                                            </li>
                                            <li class="item-bar">
                                                <span class="hd">使用时间{Common::get_help_icon('cfg_fenxiao_pic_parts_date')}</span>
                                            </li>
                                            <li class="item-bar">
                                                <span class="hd">产品价格</span>
                                            </li>
                                            <li class="item-bar">
                                                <span class="hd">分销商信息</span>
                                            </li>
                                            <li class="item-bar">
                                                <span class="hd">说明信息</span>
                                               <span id="appEditInfoTpl1" class="btn-link fr mr-20">编辑</span>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="phone-view-container">
                                <img src="{$GLOBALS['cfg_plugin_fenxiao_public_url']}admin/images/pic/templet1.jpg">
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
            <div class="layer-info-box" id="con_introduce">
                <div class="editor-bar">说明信息</div>
                <div class="editor-area"><textarea id="cfg_fenxiao_pic_introduce" name="cfg_fenxiao_pic_introduce">{$info['cfg_fenxiao_pic_introduce']}</textarea></div>
                <div class="clearfix text-c pt-20">
                    <a class="btn btn-grey-outline radius size-M" id="introduce_cancel_btn" href="javascript:;">取消</a>
                    <a class="btn btn-primary radius size-M ml-10" id="introduce_confirm_btn" href="javascript:;">确定</a>
                </div>
            </div>

            <div class="layer-info-box" id="con_introduce_tpl1">
                <div class="editor-bar">说明信息</div>
                <div class="editor-area" style="height:auto"><textarea class="textarea" id="cfg_fenxiao_pic_introduce_tpl1" name="cfg_fenxiao_pic_introduce_tpl1">{$info['cfg_fenxiao_pic_introduce_tpl1']}</textarea></div>
                <div class="clearfix text-c pt-20">
                    <a class="btn btn-grey-outline radius size-M" id="introduce_cancel_btn_tpl1" href="javascript:;">取消</a>
                    <a class="btn btn-primary radius size-M ml-10" id="introduce_confirm_btn_tpl1" href="javascript:;">确定</a>
                </div>
            </div>

        </div>
         <div class="product-add-div clearfix" id="item_weixin" style="display: none;">
                    <ul class="info-item-block">
                        <li>
                            <span class="item-hd">开关：</span>
                            <div class="item-bd">
                                <label class="radio-label"><input type="radio" name="way_weixin" {if in_array('weixin',$ways_arr)}checked="checked"{/if} value="1">开启</label>
                                <label class="radio-label ml-20"><input type="radio" name="way_weixin" {if !in_array('weixin',$ways_arr)}checked="checked"{/if} value="0">关闭</label>
                                <span class="c-999">*微信分销需要在微信配置中配置相关参数才可以使用</span>
                            </div>
                        </li>
                        <li><div class="line"></div></li>
                        <li>
                            <span class="item-hd w100"><strong>分享产品详情页</strong></span>
                            <div class="item-bd"> </div>
                        </li>
                        <li>
                            <span class="item-hd">分销文字标题：</span>
                            <div class="item-bd">
                                <textarea class="textarea w400" name="cfg_fenxiao_weixin_title">{$info['cfg_fenxiao_weixin_title']}</textarea>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">调用字段：</span>
                            <div class="item-bd">
                                <a href="javascript:;" class="label-module-item mr-5" code="SELLPOINT">产品卖点</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="TITLE">产品名称</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="PRICE">价格</a>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">描述文字：</span>
                            <div class="item-bd lh-30">
                                产品卖点
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">分销图片：</span>
                            <div class="item-bd lh-30">
                                封面图
                            </div>
                        </li>
                        <li><div class="line"></div></li>


                        <li>
                            <span class="item-hd"><strong>分享网站其他页面</strong></span>
                            <div class="item-bd"></div>
                        </li>
                        <li>
                            <span class="item-hd">分销图片：</span>
                            <div class="item-bd">
                                    <a href="javascript:;" id="file_upload" class="btn btn-primary radius size-S mt-5" name="file_upload">上传图片</a>
                                    <span class="item-text c-999 ml-10">若不设置，则默认显示网站手机端logo</span>
                                    <input type="hidden" name="cfg_fenxiao_weixin_other_litpic" id="field_cfg_fenxiao_weixin_other_litpic" value="{$info['cfg_fenxiao_weixin_other_litpic']}" />
                            </div>
                        </li>
                        <li>
                            <span class="item-hd"></span>
                            <div class="item-bd">
                                <img src="{$info['cfg_fenxiao_weixin_other_litpic']}" id="ele_cfg_fenxiao_weixin_other_litpic" style="margin: 3px;max-height: 100px;max-width: 100px">
                                <a href="javascript:;" class="btn-link" onclick="delad()" )="">删除</a>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">分销文字标题：</span>
                            <div class="item-bd">
                                <input class="input-text w400" name="cfg_fenxiao_weixin_other_title" value="{$info['cfg_fenxiao_weixin_other_title']}"/>
                                <span class="c-999">*页面标题不能获取时使用</span>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">描述文字：</span>
                            <div class="item-bd">
                                <input class="input-text w400" name="cfg_fenxiao_weixin_other_description" value="{$info['cfg_fenxiao_weixin_other_description']}"/>
                                <span class="c-999">*页面描述不能获取时使用</span>
                            </div>
                        </li>
                    </ul>
             </div>
                <div class="product-add-div clearfix" id="item_weibo" style="display: none;">
                    <ul class="info-item-block">
                        <li>
                            <span class="item-hd">开关：</span>
                            <div class="item-bd">
                                <label class="radio-label"><input type="radio" name="way_weibo" {if in_array('weibo',$ways_arr)}checked="checked"{/if} value="1">开启</label>
                                <label class="radio-label ml-20"><input type="radio" name="way_weibo" {if !in_array('weibo',$ways_arr)}checked="checked"{/if} value="0">关闭</label>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">分销文字内容：</span>
                            <div class="item-bd">
                                <textarea class="textarea w400" name="cfg_fenxiao_weibo_content">{$info['cfg_fenxiao_weibo_content']}</textarea>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">调用字段：</span>
                            <div class="item-bd">
                                <a href="javascript:;" class="label-module-item mr-5" code="SELLPOINT">产品卖点</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="TITLE">产品名称</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="PRICE">价格</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="LINK">链接</a>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="product-add-div clearfix" id="item_link" style="display: none;">
                <ul class="info-item-block">
                    <li>
                        <span class="item-hd">开关：</span>
                        <div class="item-bd">
                            <label class="radio-label"><input type="radio" name="way_link" {if in_array('link',$ways_arr)}checked="checked"{/if} value="1">开启</label>
                            <label class="radio-label ml-20"><input type="radio" name="way_link" {if !in_array('link',$ways_arr)}checked="checked"{/if} value="0">关闭</label>
                        </div>
                    </li>
                        <li>
                            <span class="item-hd">分销文字内容：</span>
                            <div class="item-bd">
                                <textarea class="textarea w400" name="cfg_weixin_copylink_content">{$info['cfg_weixin_copylink_content']}</textarea>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd">调用字段：</span>
                            <div class="item-bd">
                                <a href="javascript:;" class="label-module-item mr-5" code="SELLPOINT">产品卖点</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="TITLE">产品名称</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="PRICE">价格</a>
                                <a href="javascript:;" class="label-module-item mr-5" code="LINK">链接</a>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="product-add-div clearfix" id="item_codescan" style="display: none;">
                    <ul class="info-item-block">
                        <li>
                            <span class="item-hd">开关：</span>
                            <div class="item-bd">
                                <label class="radio-label"><input type="radio" name="way_codescan" {if in_array('codescan',$ways_arr)}checked="checked"{/if} value="1">开启</label>
                                <label class="radio-label ml-20"><input type="radio" name="way_codescan" {if !in_array('codescan',$ways_arr)}checked="checked"{/if} value="0">关闭</label>
                            </div>
                        </li>
                    </ul>
                </div>


                </form>
                <div class="mt-5">
                    <a href="javascript:;" class="btn btn-primary radius size-L ml-115" id="btn_save">保存</a>
                </div>
             </div>
        </td>
        </tr>
</table>



    <script>

        $(function(){

              //编辑
              window.introduct_editor=window.UE.getEditor('cfg_fenxiao_pic_introduce',{width:430,height:150, toolbars: [
                  ['fullscreen', 'source', 'undo', 'redo', 'FontSize','FontFamily', 'bold','Italic','ForeColor','Underline','RemoveFormat']],"minFrameHeight": "150", "initialFrameHeight": "150", "initialFrameWidth": "430", "autoHeightEnabled": false, "UEDITOR_HOME_URL": "\/res\/vendor\/slineeditor\/", "textarea": "jseditor", "initialContent": "", "wordCount": false, "elementPathEnabled": false});



            //切换菜单
            $(".cfg-header-tab span").click(function(){
                var id = $(this).attr('data-id');
                $(this).siblings().removeClass('on');
                $(this).addClass('on');

                $(".product-add-div").hide();
                $("#item_"+id).show();
            });

            //标签点击
            $('.label-module-item').click(function(){
                var ele=$(this).parents('.info-item-block:first').find('textarea:first');
                var value=$(this).attr('code');
                var value='{#'+value+'#}';
                ST.Util.insertContent(value,ele);
            });

            //保存配置信息
            //配置信息保存
            $("#btn_save").click(function(){
                //保存
                $.ajaxform({
                    url   :  SITEURL+"fenxiao/admin/config/ajax_ways_save",
                    method  :  "POST",
                    isUpload :  true,
                    form  : "#product_frm",
                    dataType: "JSON",
                    success  :  function(data, opts)
                    {
                        if(data.status)
                        {
                            ST.Util.showMsg('保存成功!','4',2000);
                        }
                        else
                        {
                            ST.Util.showMsg(data.msg,'5',2000);
                        }
                    }
                });
            })


            //海报切换
            $("#pic_templet_sel").change(function(){
                var templet_num = $("#pic_templet_sel").val();
                $("#templet_board_"+templet_num).show().siblings().hide();
            });
            $("#pic_templet_sel").trigger('change');



            //海报选项
            $('.switch-control').on('click',function(){
                var checkbox = $(this).siblings('input:checkbox:first');
                if($(this).hasClass('switch-active')){
                    $(this).removeClass('switch-active');
                    checkbox.attr('checked',false);
                }
                else{
                    $(this).addClass('switch-active');
                    checkbox.attr('checked',true);
                }
                pre_view();
            });
            //标准模板编辑
            var appEditInfo = $('#appEditInfo');
            appEditInfo.on('click',function(){

                var offSetTop = appEditInfo.offset().top - 10;
                var offSetLeft = appEditInfo.offset().left + 39;
                $('#con_introduce').css({
                    display: 'block',
                    left: offSetLeft,
                    top: offSetTop
                })
            });

            //关闭编辑框
            $("#introduce_cancel_btn").click(function(){
                $(".layer-info-box").hide();
            });
            $("#introduce_confirm_btn").click(function(){
                $(".layer-info-box").hide();
                pre_view();
            });


            //模板1编辑

            var appEditInfoTpl1 = $('#appEditInfoTpl1');
            appEditInfoTpl1.on('click',function(){
                var offSetTop = appEditInfoTpl1.offset().top - 10;
                var offSetLeft = appEditInfoTpl1.offset().left + 39;
                $('#con_introduce_tpl1').css({
                    display: 'block',
                     left: offSetLeft,
                     top: offSetTop
                })
            });

            $("#introduce_cancel_btn_tpl1").click(function(){
                $(".layer-info-box").hide();
            });
            $("#introduce_confirm_btn_tpl1").click(function(){
                $(".layer-info-box").hide();
            });




            //开启
            $("#ad_btn").click(function(){
                var url = SITEURL+'fenxiao/admin/product/info/{if isset($_GET['menuid'])}menuid/{$_GET['menuid']}/{/if}memberid/';
                parent.window.addTab('高级海报',url,1);
            });


            //预览
            pre_view();//首次调用
            function pre_view()
            {

                try {
                    var introduce = introduct_editor.getContent();
                    $(".view_introduce").html(introduce);
                }catch(e)
                {

                }
                $("input:checkbox[name^='cfg_fenxiao_pic_parts']").each(function(){
                    var val=$(this).val();
                     if($(this).is(':checked'))
                     {
                         $(".view_"+val).show();
                     }
                     else
                     {
                         $(".view_"+val).hide();
                     }
                });
            }

        })

    </script>



<script>
    $('#shop_logo').click(function(){
        ST.Util.showBox('上传图片', SITEURL + 'image/insert_view', 0,0, null, null, parent.document, {loadWindow: window, loadCallback: Insert});
        function Insert(result,bool){
            var temp =result.data[0].split('$$');
            var src = temp[0];
            if(src){
                $(".shop_logo").attr('src',src);
                $('#field_cfg_fenxiao_df_fx_shop_logo').val(src)
            }
        }
    })

    $('#file_upload').click(function(){
        ST.Util.showBox('上传图片', SITEURL + 'image/insert_view', 0,0, null, null, parent.document, {loadWindow: window, loadCallback: Insert});
        function Insert(result,bool){
            var temp =result.data[0].split('$$');
            var src = temp[0];
            if(src){
                $("#ele_cfg_fenxiao_weixin_other_litpic").attr('src',src);
                $('#field_cfg_fenxiao_weixin_other_litpic').val(src);
                $(".logolist").show();
            }
        }
    })

    //删除图片
    function delad()
    {
        var adfile=$("#field_cfg_fenxiao_weixin_other_litpic").val();
        var webid = $("#webid").val();
        if(adfile=='')
        {
            ST.Util.showMsg('还没有上传图片',1,1000);
        }
        else
        {
            $.ajax({
                type: "post",
                data: {picturepath:adfile,webid:webid},
                url: SITEURL+"uploader/delpicture",
                success: function(data,textStatus)
                {
                    if(data=='ok')
                    {
                        $("#ele_cfg_fenxiao_weixin_other_litpic")[0].src='';//"{sline:global.cfg_templets_skin/}/images/pic_tem.gif";
                        $("#field_cfg_fenxiao_weixin_other_litpic").val('');
                        $(".logolist").hide();
                    }
                }
            });
        }
    }


</script>

</body>
</html>